import java.util.Scanner;
public class Test {
    public static void main(String[] args){
        Scanner scanner =new Scanner(System.in);
        int a= scanner.nextInt();
        int count=0;
        while(a!=0){
            if((a&1)==1){
                count++;
            }
            a>>=1;
        }
        System.out.println(count);
    }
}
